The House of the Dead: ReWrithe v1.4.1 (Chapters 1-4 and the ending)
A C++ rewrite of the arcade game and its PC port, combined.
================================================================
Health warning: the game has flashing lights. A few people may have seizures from flashing lights; stop playing
if you feel unwell.

Quick start
-----------
1. Unzip this folder anywhere you like (any drive, any folder name).
2. Put your own arcade ROM zip (MAME's "hotd" set) in data\arcade.
3. Put your own 1998 PC game (its installed folder, or a .zip of it) in data\pc; music (TrackNN.ogg) in data\music.
4. Double-click HOTDReWritheSetup.bat once. After the files check it makes "The House of the Dead ReWrithe.exe" in this
   folder (your PC game's icon): start the game with that from then on. Mouse = gun.
5. Problem? The setup window says what is missing and where it goes; details are in settings\hotd.log.
6. VR headset (Meta Quest through Link / Air Link / Steam Link, or a SteamVR headset): start its PC app, put it on,
   then start "The House of the Dead ReWrithe VR.exe" (made with the other one; or "Play in VR.bat"). Step by step:
   "Play in VR" below.

Something went wrong?
---------------------
- Windows SmartScreen "protected your PC": the program is not signed; "More info" -> "Run anyway" (SHA-256 sums are
  in the release notes).
- The setup window shows CANNOT START: read the line starting with "->": it tells you what to choose or where to put it
  (the arcade zip and the PC game swapped, a .7z / .rar or CD image, a zip inside a zip, files not found).
- "OpenGL 3.3" message: update your graphics driver (from NVIDIA, AMD or Intel).
- A black, flickering or very slow picture, or a crash when the game starts or changes resolution: start it with
  "Play (Safe Mode).bat" (a 1280 x 720 window, the simplest drawing). Please report it with settings\hotd.log.
- The game closed with a message: a crash report (crash-<date>.txt) and hotd.log are in this folder's settings\.
  Please attach both to a bug report (they contain no game files). hotd.prev.log is the run before.
- Settings look wrong: delete settings\launcher.ini (a damaged one is set aside as launcher.ini.damaged by itself).
- No sound: the PC files are needed for sound (and a working audio device; the game also runs without one).

An unofficial rewrite. This package contains NO game data: you need your own copies of
  - the arcade ROMs: MAME's "hotd" set (The House of the Dead, Revision A), as a zip or loose files,
    any file or folder names (they are recognised by content);
  - the 1998 PC release, installed (sound and the PC models come from it): its folder, or a .zip of that folder
    (no need to unpack it; the game may be one folder down inside the zip). A .rar / .7z is not read: convert
    it to a .zip (or unpack it).

How to run
----------
Double-click HOTDReWritheSetup.bat. In the setup window, drop (or click to choose) your Arcade ROMs and your PC game: a zip, a .7z, a folder or a CD image (choose its .cue); any names. Then Install (or Play from here). The PC game's CD music is optional: without it the arcade's music plays. HOTDReWritheSetup.bat always opens the setup again (to change the files).
If your PC copy does not pass, try another one: copies of the 1998 PC game differ, and the US and European releases work best. When the setup says a file is missing or damaged, it is missing or damaged in that copy itself, wherever it came from: not a problem of the setup or the game. Keeping a second copy (US or European) at hand is recommended.
Your own files only: put your arcade ROM zip in data\arcade and your PC game files (a .zip of them, or unpacked)
in data\pc for a copy you carry to another PC of yours; the game then finds them by itself (also when started from bin\hotd.exe, e.g. by Steam). Never share a package
with game files in it.
Music: the PC release played CD audio; put your TrackNN.ogg files in data\music (or inside the PC zip's Music
folder). A Music folder next to your PC folder / zip, or the tracks beside the PC zip, are found as well.
.ogg or .mp3; any name whose last number is the PC CD's track number ("Track02.ogg", "House of the Dead 02.mp3");
a .zip of them in data\music works too. Numbered as the Sega Saturn disc instead of the PC CD? Options -> Advanced -> Music
Numbering (auto by default: such a set is recognised by itself) maps them to the right songs.
The setup checks the files (CRC-32 / SHA-1 against the official releases) and tells you which file is
missing or different. Results and settings are kept in this folder's settings\ (paths inside the folder are
saved relative to it, so the folder can be moved or copied to another PC of yours).

Menu: the PC version's own menu. Main menu: Arcade, Chapter Select, Boss Mode, PC Mode, Gallery, Co-op (local 2P,
4 players, online), Sonic Mode, High Scores, Options, Quit. Options: the PC's screen plus the tabs Video, Audio,
Controls, Gameplay, Mods and System; the line at the bottom explains each item.
  Boss Mode        the four bosses or all in a row, with a clock and best-times tables (a new best time asks for your name).
  PC Mode          pick a character per player (Rogan, G, Rogan 2, G 2, Sophie, Researcher) and play by the PC's rules;
                   Options -> Continues (0-9, default 5) is the PC's shared credit pool.
  Gallery          the characters and creatures in 3D, arcade or PC models.
  Secrets          hold Ctrl on the menu and type SKIDMARX (Cheat, Edit Char Stats) or CREATURE (Creature Test).
                   Thanks to RUNESA for the tip.

Steam: close Steam, then in the game press Options -> System -> Add to Steam (artwork from your own PC files).
Start Steam: the game is in your Library. Pressing it again updates the entry; Options -> System -> Add to Steam can also remove it.
Your own Steam pictures (pick and choose, mix and match): put .png / .jpg pictures in data\steam\covers (600 x 900),
"wide covers" (920 x 430), heros (the background, 1920 x 620), logos and icons (.ico too); SteamGridDB's "grids" folder works
as well. In the game: Options -> System -> Add to Steam: each picture cycles through "Game files" and yours,
then Add (Steam closed). Default.png in each folder is the game's own picture (made from your PC files when you
open that page). Pictures you did not make (e.g. from SteamGridDB): start their names with "SteamGridDB - " so the
game shows them as "SteamGridDB 1, 2..." and you can tell them apart; never publish or share them. Optional: data\steam\Optional downloads (SteamGridDB).txt lists
SteamGridDB pictures you can download yourself.

Crosshairs: Options -> Video -> Crosshair cycles the built-in sights (the arcade-style one, the PC's, a simple
cross, ring + dot, corner brackets, gap cross), then your own; Crosshair Size and Crosshair
Thickness change how big and how thick the drawn ones are. Your own crosshair pictures: put .png files in
data\crosshairs (the settings\crosshairs folder works too):
  crosshair.png      one picture, tinted per player (draw it white or grey: player 1 red, player 2 blue), or
  p1.png and p2.png  one picture per player, used exactly as they are (only p1.png: both players use it);
either directly in data\crosshairs or in a sub-folder (the folder's name is the choice's name: "Custom: <name>").
Any other .png directly in data\crosshairs is a tinted picture named after its file. Transparent PNGs (not interlaced,
up to 1024 x 1024); the picture's middle is the aim; 1 picture pixel = 1 screen pixel at 1080 lines (scaled with the
window; Crosshair Size scales it too). Command line: --crosshair custom:<name>.

Controls: player 1 = the mouse (left trigger, right reload). Player 2 = a second mouse or the keyboard
(arrows aim, Space trigger, Enter reload). Keys 1 / 2 (or a mouse's middle button) = start / join / continue.
Gamepads and light guns: Options -> Controls -> Player 1 Input / Player 2 Input (Mouse, Keyboard, Gamepad, Light Gun), and
Controller: Player 1 / 2 for a pad's control style, each with its own settings:
  Classic Pad      a stick aims (linear, small dead zone), the other stick fine-adjusts
  Motion Only      the gyro aims like a pointer (DualSense, DualShock 4, Switch Pro, Joy-Con)
  Motion + Stick   the gyro aims, a stick fine-adjusts (the default for pads with a gyro)
  Sideways         held sideways like a gun (right- or left-handed); the shoulder trigger under your finger shoots
  Touchpad         the touchpad aims: Pointer (where you touch) or Trackpad (DualSense, DualShock 4)
  Pad buttons: R2 / R1 / A (Cross) shoot, L2 / L1 / B / X reload, Y (Triangle) held = ratchet, tapped = recentre,
  Start = start / join / pause. Vibration on hits / enemy hits / reloads, the light bar in the player's colour, the
  DualSense's adaptive trigger (all per player). Unplugging a pad pauses the game until it is back.
  Light guns that act as an absolute mouse (Sinden, AimTrak, GunCon 3 with a mouse driver, Wii Remote + DolphinBar in
  mouse mode): set Light Gun, then F9 in the game to calibrate (shoot the two targets). Trigger shoots, right button
  reloads, pointing off the screen and shooting reloads.
F1 developer lines, P pause, F11 / Alt+Enter fullscreen (starts fullscreen; "Start Fullscreen" in Options -> Video, or fullscreen=0 in launcher.ini, or --windowed; remembers how you left it), F12 screenshot, Esc the pause menu.
Models: arcade by default (the arcade's models and textures); switch to the PC models in Options.

More:
  Online Co-op     (main menu: Co-op) up to four PCs over the internet or the LAN: Host a Game (name, password; send the
                   share code; Play Alone starts before anyone joins) / Join a Game (LAN list or share code); a running
                   game can be joined or rejoined. Four players: "Up to 4 PCs" (one each) or two PCs with two seats each.
                   Windows Firewall asks once: allow Private networks. Step by step (port forwarding, the firewall, what
                   each message means): ONLINE HOWTO.txt in this folder.
  Mods             (Options -> Mods) your own packs in data\mods (switch on, order); visual only.
  Sonic Mode       Off / Frenzy x1.2 / Overkill x1.5 / Nightmare (bosses faster, the Magician most): faster play,
                   cut-scenes normal, own top 10.
  Game Speed       (Options -> Video) Auto: 57.52 Hz like the arcade, 60 Hz in PC Mode; or force Arcade / 60 Hz. Frame
                   rate, vsync and Smooth Motion set how the picture is drawn.
  CRT Filter       (Options -> Video) Off / Arcade Monitor / Consumer TV / Sharp Scanlines / Custom.
  Players 3 / 4    the experimental 4-player mode (gamepads), empty seats can be CPU teammates.
Settings, the log (hotd.log) and crash reports are in this folder's settings\ (delete launcher.ini there for the defaults).

Play in VR
----------
The game can be played in a VR headset connected to this PC: you stand in the game's world, the right controller is
your gun. New and not yet tested on every headset; if it does not start, settings\hotd.log says why (the game then
plays on the monitor as usual).
1. Connect the headset to the PC and start its PC app:
   - Meta Quest 2 / 3 / 3S / Pro: install the Meta Horizon Link app on the PC (meta.com). In it: Settings -> General ->
     OpenXR Runtime -> "Set Meta Horizon Link as active". Connect the headset with a USB-C cable (Link) or over
     Wi-Fi (Air Link), then in the headset: Quick Settings -> Link -> Launch.
   - Meta Quest through SteamVR: install Steam and SteamVR on the PC, the free "Steam Link" app on the headset (from
     the headset's Store); start Steam Link in the headset and connect to the PC; in SteamVR's Settings -> OpenXR:
     "Set SteamVR as OpenXR runtime".
   - Valve Index, HTC Vive and other SteamVR headsets: install Steam and SteamVR, start SteamVR; in SteamVR's
     Settings -> OpenXR: "Set SteamVR as OpenXR runtime".
   Not sure it works? Double-click "VR Check.bat": its last line says OK or what is missing (also in settings\hotd.log).
2. Start "The House of the Dead ReWrithe VR.exe" (HOTDReWritheSetup.bat makes it beside the normal one), or
   "Play in VR.bat", or the "(VR)" shortcut the setup makes when "Create a VR shortcut" is ticked. (VR always uses the
   OpenGL renderer, whatever Options -> Video -> Renderer says.)
   The menus are on the monitor: pick the game with the mouse, then put the headset on (in data\vr\vr.ini,
   menu_panel = on shows the menus on a big screen in the headset instead: the right controller is the mouse).
Controls: trigger = shoot; grip, A or B = reload (or point the gun at the floor, or shoot off the screen); X = Start /
join; the left menu button = pause; hold a thumbstick down for 1 second = recentre (after you move your chair).
Comfort: play seated; data\vr\vr.ini has the options (cutscenes = cinema shows the cut-scenes on a big screen in front
of you; follow = level keeps the horizon level; dual_pistols = on for a gun in each hand).

Model Viewer
------------
Double-click "Model Viewer.bat" to look around the game's worlds and creatures with a free camera, from your own files
(the same data\arcade and data\pc as the game; the first start reads the ROM zip once). It shows the four chapters'
stages and their models, from the arcade or the PC release, side by side or switched one at a time. The controls are
listed on screen (H hides them). It starts fullscreen (F11 / Alt+Enter toggles; --windowed on the command line).
  WASD move, Q / E down / up, Shift faster; hold the right mouse button (or M) and move the mouse to look around
  1-4 or PgUp / PgDn chapter;  Tab everything arcade <-> PC;  F1-F5 source of the world / zombies / bosses / effects / humans
  P source of the model at the screen centre;  R clear those choices;  N next recorded creature view
  U / Shift+U next / previous motion of the creature in the middle;  J animation on / off;  O creatures;  K sky
  L lighting;  F arcade texture filtering;  G arcade gamma;  Y ride the Chapter 1 camera rail
  F12 screenshot (the package's screenshots\ folder);  C print the camera;  Esc quit

Teaser limits: Chapters 1-4 and the ending play, but parts are not ported yet and are skipped, and some scenes are rough. Everything the game shows
and plays comes from your own ROMs and PC files.

Windows 10/11, 64-bit, OpenGL 3.3. Made by tools\make_portable_hotd.ps1 in the rewrite's repository.
